<template>
	<el-dialog :title="title" :visible.sync="dialogConfig.mainVisible" width="35%" center>
		<el-dialog width="30%" title="确认要重置密码？" :visible.sync="dialogConfig.innerVisible" append-to-body>
			<slot name="innerCont"></slot>
			<div>密码重置后，该账号的密码将会初始化为123456，确认重置后立即生效，请慎重使用该功能</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="handleInnerClose('cancel')">取 消</el-button>
				<el-button type="primary" @click="handleInnerClose('confirm')">确 定</el-button>
			</div>
		</el-dialog>
		<slot name="mainCont"></slot>
		<div slot="footer" class="dialog-footer">
			<el-button @click="handleClose">取 消</el-button>
			<el-button type="primary" @click="handleClose">确 定</el-button>
		</div>
	</el-dialog>
</template>

<script>
export default {
	props: {
		title: {
			type: String,
			default: ''
		},
		dialogConfig: {
			type: Object,
			default: {
				id: '',
				mainVisible: false,
				innerVisible: false
			},
		}
	},
	data() {
		return {
			
		}
	},
	methods: {
		handleClose() {
			this.$emit('mainDialogOpeartion', false);
		},
		handleInnerClose(params) {
			if (params === 'cancel') {
				this.$emit('innerDialogOpeartion', false);
			} else {
				this.$emit('innerDialogOpeartion', false);
				this.$emit('mainDialogOpeartion', false);
			}
		}
	},
	created() {}
}
</script>

<style <style lang="less" scoped>

</style>
